LINUX/x86_64: Ensure that the initial page tables allow userspace
authorIan Campbell <ian.campbell@xensource.com>
Thu, 24 May 2007 08:14:43 +0000 (09:14 +0100)
committerIan Campbell <ian.campbell@xensource.com>
Thu, 24 May 2007 08:14:43 +0000 (09:14 +0100)
mappings of the vsyscall page. This matches native behaviour by
setting the U bit on the L2-L4 page table entries and controlling
access using the L1 entries.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c

index c1b582c4c9e2a9cabbff7b0b5d718c290973a827..55fcd37af5298b0d7d8faeb2ae6b7452aeaca294 100644 (file)
@@ -580,7 +580,7 @@ void __init xen_init_pt(void)
 
        /* Construct mapping of initial pte page in our own directories. */
        init_level4_pgt[pgd_index(__START_KERNEL_map)] = 
-               mk_kernel_pgd(__pa_symbol(level3_kernel_pgt));
+               mk_kernel_pgd(__pa_symbol(level3_kernel_pgt) | _PAGE_USER);
        level3_kernel_pgt[pud_index(__START_KERNEL_map)] = 
                __pud(__pa_symbol(level2_kernel_pgt) |
                      _KERNPG_TABLE);